# Maintainer: David Runge <dvzrv@archlinux.org>
# Contributor: Gaetan Bisson <bisson@archlinux.org>
# Contributor: Angel Velasquez <angvp@archlinux.org> 
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: damir <damir@archlinux.org>
# Contributor: Daniel Bainton <dpb [at] backarrow.org>

pkgname=ncmpc
pkgver=0.46
pkgrel=1
pkgdesc="Fully featured MPD client which runs in a terminal"
arch=(x86_64)
url=https://www.musicpd.org/clients/ncmpc/
license=(GPL2)
depends=(gcc-libs glibc lirc pcre2)
makedepends=(boost libmpdclient meson ncurses python-sphinx)
optdepends=('python-requests: for lyrics script')
source=("https://www.musicpd.org/download/${pkgname}/${pkgver%.*}/${pkgname}-${pkgver}.tar.xz"{,.sig})
sha512sums=('34cbb9ff527bfa4d849069694b6d1a1e54c932b64538e799c9ef9b9ccc42ed24932b6bcbf3552af6ce846af6b7399916e1aabc6c79ac564f1c9fe56a33b6332f'
            'SKIP')
b2sums=('e57a931f5a512c543d48a9b6e532c7944e655d28d02fe9ec2b5b41563e2e6a5806924a668ae592f3fee58a2bb04a681fee0903b8046a61ce39a453092dfd8623'
        'SKIP')
validpgpkeys=('0392335A78083894A4301C43236E8A58C6DB4512') # Max Kellermann <max@blarg.de>

build() {
  cd "${pkgname}-${pkgver}"
  arch-meson -D lyrics_screen=true -D chat_screen=true build
  ninja -C build
}

package() {
  depends+=(libmpdclient.so libncursesw.so)

  cd "${pkgname}-${pkgver}"
  DESTDIR="${pkgdir}" ninja -C build install
}
